<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>99乘法表</title>
</head>
<body>
  <div id="app">

  </div>
  <button id="btn">生成99乘法表</button>
  <script>
    document.getElementById("btn").onclick = function () {
      for (var i = 1; i <= 9; i++) {
        var str = "";
        for (var j = 1; j <= i; j++) {
          str += i +"*"+j+"="+i*j +"   "
        }
        document.getElementById("app").innerHTML+="<div>"+str+"</div>"
      }
    }
  </script>
</body>
</html>